import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/js/eslint'// eslint
import store from './store' // vuex
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/reset.css'//重置默认样式
import './assets/icon/iconfont.css'//icon
import http from '@/utils/http' 
import { isAuth } from '@/utils'

Vue.use(ElementUI);
Vue.config.productionTip = false

// 非生产环境, 适配mockjs模拟数据                 // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') {
  require('@/mock')
}

// 挂载全局
Vue.prototype.$http = http // ajax请求方法
Vue.prototype.isAuth = isAuth     // 权限方法


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
